home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #8 / Software USA Volume 4.08.iso / mac / LifeStyles / ComicBase / ComicBase.sea / ComicBase 3 Mac Demo / ComicBase 3 Demo.rsrc / LENS_146_Grading Setup < prev    next >
Text File  |  1998-02-04  |  9KB  |  117 lines

  1. ItemType: WIND
  2. Rect: 297,284,727,484
  3. Style: Dialog
  4. HasTitleBar: TRUE
  5. HasZoomBox: FALSE
  6. Name: Grading Setup
  7. WhiteColor: -8739,-8739,-8739
  8. Script: --on windowEvent  wdID,wdName,objNo,objName,objValue¬Global gGradeList¬global gWindowPositions¬global gMustRegrade¬¬---------------------¬-- This is window #28¬---------------------¬¬if objValue="Open" then ¬  wsSet wdID,"GradeList","Text", gGradeList¬  wsSet wdID,"PctOfNM","KeyFilter", "OnlyDigits"¬  ¬  put false into gMustRegrade¬  ¬  -- Restore old window position¬  put OldWindowPosition(28) into windowRect¬  if windowRect = empty then centerWindow wdName¬  else wsSet wdID,"0","Rect",windowRect¬  ¬  get "Remove_Disabled:True" & return & "Abbreviation_Disabled:True" & return & "Grade_Disabled:True" & return & "PctOfNM_Disabled:True" & return¬  wsSet wdID,0,"Properties",it¬  ¬else if objValue="Close" then ¬  -- save the window position¬  put "28" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 28 of gWindowPositions¬   ¬end if¬¬--end windowEvent
  9.  
  10. ItemType: PUSH
  11. Rect: 339,123,419,143
  12. AutoSize: FALSE
  13. Name: Save
  14. Balloon: Click here to save your changes.
  15. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gMustRegrade¬global gGradeList¬¬put wsGet(wdID,"GradeList","Text") into gGradeList¬¬if gMustRegrade then send AdjustGrading to cd btn "Adjust Grading" of cd 2¬else wsSend "Grading Setup","0","Close"¬--end mouseUp¬¬¬
  16.  
  17. ItemType: PUSH
  18. Rect: 339,148,419,168
  19. Name: Cancel
  20. CancelItem: TRUE
  21. AutoClose: TRUE
  22. Balloon: Click here to exit without saving your changes.
  23.  
  24. ItemType: LIST
  25. Rect: 10,60,328,190
  26. TextFont: Geneva
  27. TextSize: 12
  28. Name: GradeList
  29. Style: ListWithTabs...
  30. StyleInfo: ........................>.........<
  31. Logic: Drag
  32. Text: Mint    M    105¬Near Mint    NM    100¬Very Fine    VF    75¬Fine    FN    50¬Very Good    VG    35¬Good    GD    20¬Fair    FA    10¬Poor    P    5
  33. Balloon: This is the list of all condition gradings.
  34. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬¬put wsGet(wdID,"GradeList","Selection") into gradeLine¬put wsGet(wdID,"GradeList","Text") into gradeList¬put line gradeLine of gradeList into theLine¬if theLine <> empty then¬  set the itemDelimiter to tab¬  put item 1 of theLine into theGradeName¬  put item 2 of theLine into theGradeAbbreviation¬  put theGradeAbbreviation into gLastGradeAbbreviation¬  put item 3 of theLine into thePctOfNM¬  put thePctOfNM into gLastPctOfNM¬  ¬  put "Grade_Selection:0,100" & return into theSelection¬  ¬  get "Grade_Text:" & theGradeName & return & "Abbreviation_Text:" & theGradeAbbreviation & return & "PctOfNM_Text:" & thePctOfNM & return & "Remove_Disabled:False" & return & "Grade_Disabled:False" & return & "Abbreviation_Disabled:false" & return & "PctOfNM_Disabled:False" & return ¬else¬  put "Grade_Selection:0,0" into theSelection¬  get "Remove_Disabled:True" & return & "Grade_Text:" & return & "Abbreviation_Text:" & return & "PctOfNM_Text:" & return  & "Grade_Disabled:True" & return & "Abbreviation_Disabled:True" & return & "PctOfNM_Disabled:True" & return¬  ¬end if¬wsSet wdID,"0", "Properties", it & theSelection¬--end mouseUp
  35.  
  36. ItemType: TEXT
  37. Rect: 10,35,205,57
  38. TextFont: Geneva
  39. TextSize: 12
  40. Disabled: TRUE
  41. Name: Grade
  42. LockText: FALSE
  43. KeyFilter: bOnly20Chars
  44. Balloon: Enter the (relatively) long description of the condition grade here. For example (“Near Mint” or “Fair”).
  45. Script: --on closeField  wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"Grade","Text") into theGrade¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬if theGrade <> empty then¬  put wsGet(wdID,"GradeList","Text") into theGradeList¬  set the itemDelimiter to tab¬  ¬  put line theGradeLine of theGradeList into theLine¬  put theGrade & tab & (item 2 to 3 of theLine) into line theGradeLine of theGradeList¬  wsSet wdID,"GradeList","Text", theGradeList¬end if¬wsSet wdID,"GradeList","Selection", theGradeLine¬--end closeField
  46.  
  47. ItemType: TEXT
  48. Rect: 208,35,252,57
  49. TextFont: Geneva
  50. TextSize: 12
  51. Disabled: TRUE
  52. Name: Abbreviation
  53. LockText: FALSE
  54. KeyFilter: bOnly4Chars
  55. Balloon: Enter the short, one or two character abbreviation for the conditiong grade here. (E.g., “NM” to stand for “Near Mint”) or “VF” to stand for “Very Fine”). ¬¬This is the abbreviation that will appear on price lists and price labels.
  56. Script: --on closeField  wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬global gMustRegrade¬¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬put wsGet(wdID,"Abbreviation","Text") into theGradeAbbrev¬¬put false into duplicateFound¬¬if theGradeAbbrev <> empty then¬  put wsGet(wdID,"GradeList","Text") into theGradeList¬  ¬  set the itemDelimiter to tab¬  ¬  -- Check for a duplicate¬  repeat with x = 1 to the number of lines of theGradeList¬    if x <> theGradeLine then¬      if item 2 of line X of theGradeList = theGradeAbbrev then¬        wsSet wdID,"Abbreviation","Text", ""¬        wsSet wdID,"Abbreviation","Grade", "0,100"¬        get windowScript("Stop Alert","Sorry, but there’s already another grade with the abbreviation “" & theGradeAbbrev & "”. Please choose another.","OK")¬        ¬        put true into duplicateFound¬      end if¬    end if¬  end repeat¬  ¬  if not duplicateFound then¬    put line theGradeLine of theGradeList into theLine¬    put (item 1 of theLine) & tab & theGradeAbbrev & tab & (item 3 of theLine) into line theGradeLine of theGradeList¬    wsSet wdID,"GradeList","Text", theGradeList¬  end if¬end if¬¬if not duplicateFound then ¬  wsSet wdID,"GradeList","Selection", theGradeLine¬  if theGradeAbbrev <> gLastGradeAbbrev and gLastGradeAbbrev <> empty then put true into gMustRegrade¬end if¬--end closeField¬¬
  57.  
  58. ItemType: TEXT
  59. Rect: 255,35,308,57
  60. TextFont: Geneva
  61. TextSize: 12
  62. Disabled: TRUE
  63. Name: PctOfNM
  64. LockText: FALSE
  65. KeyFilter: OnlyDigits
  66. Balloon: This is the percent price that a comic in this grade would fetch as opposed to a similar comic in “Near Mint” condition.¬¬For instance, a comic in “Fine” condition might rate as 75% of a near mint version.
  67. Script: --on closeField  wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬global gMustRegrade¬¬put wsGet(wdID,"PctOfNM","Text") into thePctOfNM¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬if thePctOfNM <> empty then¬  put wsGet(wdID,"GradeList","Text") into theGradeList¬  set the itemDelimiter to tab¬  ¬  put line theGradeLine of theGradeList into theLine¬  put ((item 1 to 2 of theLine) & tab & thePctOfNM) into line theGradeLine of theGradeList¬  wsSet wdID,"GradeList","Text", theGradeList¬end if¬wsSet wdID,"GradeList","Selection", theGradeLine¬if thePctOfNM <> gLastPctOfNM and gLastPctOfNM <> empty then put true into gMustRegrade¬--end closeField
  68.  
  69. ItemType: TEXT
  70. Rect: 14,22,49,34
  71. TextFont: Geneva
  72. TextSize: 9
  73. Name: GradeLabel
  74. WhiteColor: -8739,-8739,-8739
  75. TextStyle: Bold
  76. Text: Grade
  77.  
  78. ItemType: TEXT
  79. Rect: 208,22,251,34
  80. TextFont: Geneva
  81. TextSize: 9
  82. Name: AbbrevLabel
  83. WhiteColor: -8739,-8739,-8739
  84. TextStyle: Bold
  85. Text: Abbrev
  86.  
  87. ItemType: TEXT
  88. Rect: 252,10,312,34
  89. TextFont: Geneva
  90. TextSize: 9
  91. Name: PctLabel
  92. WhiteColor: -8739,-8739,-8739
  93. TextStyle: Bold
  94. TextAlign: Center
  95. Text: % of¬Near Mint
  96.  
  97. ItemType: PUSH
  98. Rect: 339,60,419,80
  99. Name: New
  100. Balloon: Click here to add a new condition grading to the list.
  101. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬¬put empty into gLastPctOfNM¬put empty into gLastGradeAbbrev¬¬put wsGet(wdID,"GradeList","Text") into theList¬¬put tab & tab & return before theList¬wsSet wdID,"GradeList","Text",theList¬wsSet "Grading Setup","0", "Properties", "GradeList_Selection:1" & return & "Grade_Text:" & return & "Abbreviation_Text:" & return & "PctOfNM_Text:" & return & "Grade_Selection:0,0" & return & "Grade_Disabled:False" & return & "PctOfNM_Disabled:False" & return & "Abbreviation_Disabled:False" & return¬--end mouseUp
  102.  
  103. ItemType: PUSH
  104. Rect: 339,85,419,105
  105. Disabled: TRUE
  106. Name: Remove
  107. Balloon: Click here to remove the selected grading condition from the list.
  108. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"GradeList","Selection") into theLine¬put wsGet(wdID,"GradeList","Text") into theList¬if the number of lines of theList = 1 then¬  get windowScript ("Stop Alert","There must be at least one grading type for ComicBase to work properly.")¬else¬  delete line theLine of theList¬  ¬  wsSet wdID,"GradeList","Text",theList¬  ¬  set the itemDelimiter to tab¬  put item 1 of line theLine of theList into theGrade¬  put item 2 of line theLine of theList into theAbbreviation¬  put item 3 of line theLine of theList into thePctOfNM¬  get "GradeList_Selection:" & theLine & return & "Grade_Text:" & theGrade & return & "Abbreviation_Text:" & theAbbreviation & return & "PctOfNM_Text:" & thePctOfNM & return¬  ¬  if line theLine of theList <> empty then¬    put "Remove_Disabled:False" & return & "PctOfNM_Selection:0,100" & return after it¬  else¬    put "Remove_Disabled_True" & return  & "Grade_Selection:0,100" & return after it¬  end if¬  ¬  wsSet wdID,"0", "Properties", it¬end if¬--end mouseUp¬
  109.  
  110. ItemType: LINE
  111. Rect: 339,114,418,115
  112. WhiteColor: -26215,-26215,-26215
  113. Pen: White
  114.  
  115. ItemType: LINE
  116. Rect: 339,115,418,116
  117. Pen: White